<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // const arr=["a","c","d","b"]
        // console.log(arr);
        
        // console.log(arr.sort(),arr);
        const arr2=[13,24,51,3]
        console.log(arr2.sort());
        console.log(arr2.sort((x,y)=>x-y));
    </script>
</body>
</html>